<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('admins', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name') -> comment('姓名');
            $table->string('password', 255) -> comment('密码');
            $table->string('email') -> comment('邮箱');
            $table->string('phone') -> comment('手机号');
            $table->string('token') -> comment('令牌');
            $table->smallInteger('status') -> comment('状态,0为普通管理员,1为超级管理员,2为禁用');
            $table->smallInteger('airline') -> comment('在线,0不在线,1在线');
            $table->timestamps();
             });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('admins');
    }
}
